<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:112:"/Users/juyaobin/Desktop/clover_download/application/bbs_admin/view/permission_to_read/PermissionToReadIndex.html";i:1564928652;}*/ ?>
<!DOCTYPE html>
<html lang="en" data-textdirection="ltr" class="loading">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
    <meta name="description"
        content="Robust admin is super flexible, powerful, clean &amp; modern responsive bootstrap 4 admin template with unlimited possibilities.">
    <meta name="keywords"
        content="admin template, robust admin template, dashboard template, flat admin template, responsive admin template, web app">
    <meta name="author" content="PIXINVENT">
    <title>Basic Tables - Robust Free Bootstrap Admin Template</title>
    <script src="/public/jquery/jquery-3.3.1.min.js" type="text/javascript"></script>
    <link rel="apple-touch-icon" sizes="60x60" href="/public/bbs_admin/app-assets/images/ico/apple-icon-60.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/public/bbs_admin/app-assets/images/ico/apple-icon-76.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/public/bbs_admin/app-assets/images/ico/apple-icon-120.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/public/bbs_admin/app-assets/images/ico/apple-icon-152.png">
    <link rel="shortcut icon" type="image/x-icon" href="/public/bbs_admin/app-assets/images/ico/favicon.ico">
    <link rel="shortcut icon" type="image/png" href="/public/bbs_admin/app-assets/images/ico/favicon-32.png">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <!-- BEGIN VENDOR CSS-->
    <link rel="stylesheet" type="text/css" href="/public/bbs_admin/app-assets/css/bootstrap.css">
    <!-- font icons-->
    <link rel="stylesheet" type="text/css" href="/public/bbs_admin/app-assets/fonts/icomoon.css">
    <link rel="stylesheet" type="text/css"
        href="/public/bbs_admin/app-assets/fonts/flag-icon-css/css/flag-icon.min.css">
    <link rel="stylesheet" type="text/css" href="/public/bbs_admin/app-assets/vendors/css/extensions/pace.css">
    <!-- END VENDOR CSS-->
    <!-- BEGIN ROBUST CSS-->
    <link rel="stylesheet" type="text/css" href="/public/bbs_admin/app-assets/css/bootstrap-extended.css">
    <link rel="stylesheet" type="text/css" href="/public/bbs_admin/app-assets/css/app.css">
    <link rel="stylesheet" type="text/css" href="/public/bbs_admin/app-assets/css/colors.css">
    <!-- END ROBUST CSS-->
    <!-- BEGIN Page Level CSS-->
    <link rel="stylesheet" type="text/css"
        href="/public/bbs_admin/app-assets/css/core/menu/menu-types/vertical-menu.css">
    <link rel="stylesheet" type="text/css"
        href="/public/bbs_admin/app-assets/css/core/menu/menu-types/vertical-overlay-menu.css">
    <!-- END Page Level CSS-->
    <!-- BEGIN Custom CSS-->
    <link rel="stylesheet" type="text/css" href="/public/bbs_admin/assets/css/style.css">
    <!-- END Custom CSS-->
    <script src="/public/layui/layui.all.js"></script>
</head>

<body data-open="click" data-menu="vertical-menu" data-col="2-columns"
    class="vertical-layout vertical-menu 2-columns  fixed-navbar">

    <!-- navbar-fixed-top-->
    <nav class="header-navbar navbar navbar-with-menu navbar-fixed-top navbar-semi-dark navbar-shadow">
        <div class="navbar-wrapper">
            <div class="navbar-header">
                <ul class="nav navbar-nav">
                    <li class="nav-item mobile-menu hidden-md-up float-xs-left"><a
                            class="nav-link nav-menu-main menu-toggle hidden-xs"><i
                                class="icon-menu5 font-large-1"></i></a></li>
                    <li class="nav-item"><a href="index.html" class="navbar-brand nav-link"><img alt="branding logo"
                                src="/public/bbs_admin/app-assets/images/logo/robust-logo-light.png"
                                data-expand="/public/bbs_admin/app-assets/images/logo/robust-logo-light.png"
                                data-collapse="/public/bbs_admin/app-assets/images/logo/robust-logo-small.png"
                                class="brand-logo"></a></li>
                    <li class="nav-item hidden-md-up float-xs-right"><a data-toggle="collapse"
                            data-target="#navbar-mobile" class="nav-link open-navbar-container"><i
                                class="icon-ellipsis pe-2x icon-icon-rotate-right-right"></i></a></li>
                </ul>
            </div>
            <div class="navbar-container content container-fluid">
                <div id="navbar-mobile" class="collapse navbar-toggleable-sm">
                    <ul class="nav navbar-nav">
                        <li class="nav-item hidden-sm-down"><a class="nav-link nav-menu-main menu-toggle hidden-xs"><i
                                    class="icon-menu5"> </i></a></li>
                        <li class="nav-item hidden-sm-down"><a href="#" class="nav-link nav-link-expand"><i
                                    class="ficon icon-expand2"></i></a></li>
                        <li class="nav-item hidden-sm-down"><a
                                href="https://pixinvent.com/bootstrap-admin-template/robust/" target="_blank"
                                class="btn btn-success upgrade-to-pro">Upgrade to PRO $24</a></li>
                    </ul>
                    <ul class="nav navbar-nav float-xs-right">
                        <li class="dropdown dropdown-language nav-item"><a id="dropdown-flag" href="#"
                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
                                class="dropdown-toggle nav-link"><i class="flag-icon flag-icon-gb"></i><span
                                    class="selected-language">English</span></a>
                            <div aria-labelledby="dropdown-flag" class="dropdown-menu"><a href="#"
                                    class="dropdown-item"><i class="flag-icon flag-icon-gb"></i> English</a><a href="#"
                                    class="dropdown-item"><i class="flag-icon flag-icon-fr"></i> French</a><a href="#"
                                    class="dropdown-item"><i class="flag-icon flag-icon-cn"></i> Chinese</a><a href="#"
                                    class="dropdown-item"><i class="flag-icon flag-icon-de"></i> German</a></div>
                        </li>
                        <li class="dropdown dropdown-notification nav-item"><a href="#" data-toggle="dropdown"
                                class="nav-link nav-link-label"><i class="ficon icon-bell4"></i><span
                                    class="tag tag-pill tag-default tag-danger tag-default tag-up">5</span></a>
                            <ul class="dropdown-menu dropdown-menu-media dropdown-menu-right">
                                <li class="dropdown-menu-header">
                                    <h6 class="dropdown-header m-0"><span
                                            class="grey darken-2">Notifications</span><span
                                            class="notification-tag tag tag-default tag-danger float-xs-right m-0">5
                                            New</span></h6>
                                </li>
                                <li class="list-group scrollable-container"><a href="javascript:void(0)"
                                        class="list-group-item">
                                        <div class="media">
                                            <div class="media-left valign-middle"><i
                                                    class="icon-cart3 icon-bg-circle bg-cyan"></i></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">You have new order!</h6>
                                                <p class="notification-text font-small-3 text-muted">Lorem ipsum dolor
                                                    sit amet, consectetuer elit.</p><small>
                                                    <time datetime="2015-06-11T18:29:20+08:00"
                                                        class="media-meta text-muted">30 minutes ago</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)" class="list-group-item">
                                        <div class="media">
                                            <div class="media-left valign-middle"><i
                                                    class="icon-monitor3 icon-bg-circle bg-red bg-darken-1"></i></div>
                                            <div class="media-body">
                                                <h6 class="media-heading red darken-1">99% Server load</h6>
                                                <p class="notification-text font-small-3 text-muted">Aliquam tincidunt
                                                    mauris eu risus.</p><small>
                                                    <time datetime="2015-06-11T18:29:20+08:00"
                                                        class="media-meta text-muted">Five hour ago</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)" class="list-group-item">
                                        <div class="media">
                                            <div class="media-left valign-middle"><i
                                                    class="icon-server2 icon-bg-circle bg-yellow bg-darken-3"></i></div>
                                            <div class="media-body">
                                                <h6 class="media-heading yellow darken-3">Warning notifixation</h6>
                                                <p class="notification-text font-small-3 text-muted">Vestibulum auctor
                                                    dapibus neque.</p><small>
                                                    <time datetime="2015-06-11T18:29:20+08:00"
                                                        class="media-meta text-muted">Today</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)" class="list-group-item">
                                        <div class="media">
                                            <div class="media-left valign-middle"><i
                                                    class="icon-check2 icon-bg-circle bg-green bg-accent-3"></i></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">Complete the task</h6><small>
                                                    <time datetime="2015-06-11T18:29:20+08:00"
                                                        class="media-meta text-muted">Last week</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)" class="list-group-item">
                                        <div class="media">
                                            <div class="media-left valign-middle"><i
                                                    class="icon-bar-graph-2 icon-bg-circle bg-teal"></i></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">Generate monthly report</h6><small>
                                                    <time datetime="2015-06-11T18:29:20+08:00"
                                                        class="media-meta text-muted">Last month</time></small>
                                            </div>
                                        </div>
                                    </a></li>
                                <li class="dropdown-menu-footer"><a href="javascript:void(0)"
                                        class="dropdown-item text-muted text-xs-center">Read all notifications</a></li>
                            </ul>
                        </li>
                        <li class="dropdown dropdown-notification nav-item"><a href="#" data-toggle="dropdown"
                                class="nav-link nav-link-label"><i class="ficon icon-mail6"></i><span
                                    class="tag tag-pill tag-default tag-info tag-default tag-up">8</span></a>
                            <ul class="dropdown-menu dropdown-menu-media dropdown-menu-right">
                                <li class="dropdown-menu-header">
                                    <h6 class="dropdown-header m-0"><span class="grey darken-2">Messages</span><span
                                            class="notification-tag tag tag-default tag-info float-xs-right m-0">4
                                            New</span></h6>
                                </li>
                                <li class="list-group scrollable-container"><a href="javascript:void(0)"
                                        class="list-group-item">
                                        <div class="media">
                                            <div class="media-left"><span
                                                    class="avatar avatar-sm avatar-online rounded-circle"><img
                                                        src="/public/bbs_admin/app-assets/images/portrait/small/avatar-s-1.png"
                                                        alt="avatar"><i></i></span></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">Margaret Govan</h6>
                                                <p class="notification-text font-small-3 text-muted">I like your
                                                    portfolio, let's start the project.</p><small>
                                                    <time datetime="2015-06-11T18:29:20+08:00"
                                                        class="media-meta text-muted">Today</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)" class="list-group-item">
                                        <div class="media">
                                            <div class="media-left"><span
                                                    class="avatar avatar-sm avatar-busy rounded-circle"><img
                                                        src="/public/bbs_admin/app-assets/images/portrait/small/avatar-s-2.png"
                                                        alt="avatar"><i></i></span></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">Bret Lezama</h6>
                                                <p class="notification-text font-small-3 text-muted">I have seen your
                                                    work, there is</p><small>
                                                    <time datetime="2015-06-11T18:29:20+08:00"
                                                        class="media-meta text-muted">Tuesday</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)" class="list-group-item">
                                        <div class="media">
                                            <div class="media-left"><span
                                                    class="avatar avatar-sm avatar-online rounded-circle"><img
                                                        src="/public/bbs_admin/app-assets/images/portrait/small/avatar-s-3.png"
                                                        alt="avatar"><i></i></span></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">Carie Berra</h6>
                                                <p class="notification-text font-small-3 text-muted">Can we have call in
                                                    this week ?</p><small>
                                                    <time datetime="2015-06-11T18:29:20+08:00"
                                                        class="media-meta text-muted">Friday</time></small>
                                            </div>
                                        </div>
                                    </a><a href="javascript:void(0)" class="list-group-item">
                                        <div class="media">
                                            <div class="media-left"><span
                                                    class="avatar avatar-sm avatar-away rounded-circle"><img
                                                        src="/public/bbs_admin/app-assets/images/portrait/small/avatar-s-6.png"
                                                        alt="avatar"><i></i></span></div>
                                            <div class="media-body">
                                                <h6 class="media-heading">Eric Alsobrook</h6>
                                                <p class="notification-text font-small-3 text-muted">We have project
                                                    party this saturday night.</p><small>
                                                    <time datetime="2015-06-11T18:29:20+08:00"
                                                        class="media-meta text-muted">last month</time></small>
                                            </div>
                                        </div>
                                    </a></li>
                                <li class="dropdown-menu-footer"><a href="javascript:void(0)"
                                        class="dropdown-item text-muted text-xs-center">Read all messages</a></li>
                            </ul>
                        </li>
                        <li class="dropdown dropdown-user nav-item"><a href="#" data-toggle="dropdown"
                                class="dropdown-toggle nav-link dropdown-user-link"><span
                                    class="avatar avatar-online"><img
                                        src="/public/bbs_admin/app-assets/images/portrait/small/avatar-s-1.png"
                                        alt="avatar"><i></i></span><span class="user-name">John Doe</span></a>
                            <div class="dropdown-menu dropdown-menu-right"><a href="#" class="dropdown-item"><i
                                        class="icon-head"></i> Edit Profile</a><a href="#" class="dropdown-item"><i
                                        class="icon-mail6"></i> My Inbox</a><a href="#" class="dropdown-item"><i
                                        class="icon-clipboard2"></i> Task</a><a href="#" class="dropdown-item"><i
                                        class="icon-calendar5"></i> Calender</a>
                                <div class="dropdown-divider"></div><a href="#" class="dropdown-item"><i
                                        class="icon-power3"></i> Logout</a>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </nav>

    <!-- ////////////////////////////////////////////////////////////////////////////-->


    <?php echo $head; ?>

    <div class="app-content content container-fluid">
        <div class="content-wrapper">
            <div class="content-header row">
                <div class="content-header-left col-md-6 col-xs-12 mb-1">
                    <h2 class="content-header-title">
                        <button onclick='new_jurisdiction_level()' type="button"
                            class="btn btn-success btn-min-width mr-1">新建</button>
                    </h2>
                </div>
                <div class="content-header-right breadcrumbs-right breadcrumbs-top col-md-6 col-xs-12">
                    <div class="breadcrumb-wrapper col-xs-12">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="index.html">控制台</a>
                            </li>
                            <li class="breadcrumb-item"><a href="#">阅读权限管理</a>
                            </li>
                            <li class="breadcrumb-item active">阅读权限列表
                            </li>
                        </ol>
                    </div>
                </div>
            </div>

            <div class="card">
                <div class="card-header">
                    <h4 class="card-title">列表</h4>
                    <a class="heading-elements-toggle"><i class="icon-ellipsis font-medium-3"></i></a>
                    <div class="heading-elements">
                        <ul class="list-inline mb-0">
                            <li><a data-action="collapse"><i class="icon-minus4"></i></a></li>
                            <li><a data-action="reload"><i class="icon-reload"></i></a></li>
                            <li><a data-action="expand"><i class="icon-expand2"></i></a></li>
                            <li><a data-action="close"><i class="icon-cross2"></i></a></li>
                        </ul>
                    </div>
                </div>
                <div class="card-body collapse in">
                    <div class="card-block card-dashboard">
                        <div class="table-responsive">
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>id</th>
                                        <th>名称</th>
                                        <th>所需积分</th>
                                        <th>添加时间</th>
                                        <th>时间戳</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id='list'>
                                    <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                                    <tr id='tr_jurisdiction_number_<?php echo $vo['id']; ?>'>
                                        <td>
                                            <?php echo $vo['id']; ?>
                                        </td>
                                        <td id='td_level_name_<?php echo $vo['id']; ?>'>
                                            <?php echo $vo['level_name']; ?>
                                        </td>
                                        <td id='td_jurisdiction_number_<?php echo $vo['id']; ?>'>
                                            <?php echo $vo['jurisdiction_number']; ?>
                                        </td>
                                        <td>
                                            <?php echo $vo['add_time']; ?>
                                        </td>
                                        <td>
                                            <?php echo $vo['time']; ?>
                                        </td>
                                        <td>
                                            <a onclick='edit_jurisdiction_level("<?php echo $vo['id']; ?>")'>编辑</a> ｜<a
                                                onclick='delete_jurisdiction_level("<?php echo $vo['id']; ?>",false)'>删除</a>
                                        </td>
                                    </tr>
                                    <?php endforeach; endif; else: echo "" ;endif; ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title">已删除</h4>
                    <a class="heading-elements-toggle"><i class="icon-ellipsis font-medium-3"></i></a>
                    <div class="heading-elements">
                        <ul class="list-inline mb-0">
                            <li><a data-action="collapse"><i class="icon-minus4"></i></a></li>
                            <li><a data-action="reload"><i class="icon-reload"></i></a></li>
                            <li><a data-action="expand"><i class="icon-expand2"></i></a></li>
                            <li><a data-action="close"><i class="icon-cross2"></i></a></li>
                        </ul>
                    </div>
                </div>
                <div class="card-body collapse in">
                    <div class="card-block card-dashboard">
                        <div class="table-responsive">
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>id</th>
                                        <th>名称</th>
                                        <th>所需积分</th>
                                        <th>添加时间</th>
                                        <th>时间戳</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id='delete_list'>
                                    <?php if(is_array($delete_list) || $delete_list instanceof \think\Collection || $delete_list instanceof \think\Paginator): $i = 0; $__LIST__ = $delete_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                                    <tr id='delete_tr_jurisdiction_number_<?php echo $vo['id']; ?>'>
                                        <td>
                                            <?php echo $vo['id']; ?>
                                        </td>
                                        <td id='delete_td_level_name_<?php echo $vo['id']; ?>'>
                                            <?php echo $vo['level_name']; ?>
                                        </td>
                                        <td id='delete_td_jurisdiction_number_<?php echo $vo['id']; ?>'>
                                            <?php echo $vo['jurisdiction_number']; ?>
                                        </td>
                                        <td>
                                            <?php echo $vo['add_time']; ?>
                                        </td>
                                        <td>
                                            <?php echo $vo['time']; ?>
                                        </td>
                                        <td>
                                            <a onclick='recover_jurisdiction_level("<?php echo $vo['id']; ?>")'>恢复</a> ｜<a
                                                onclick='delete_jurisdiction_level("<?php echo $vo['id']; ?>",true)'>永久删除</a>
                                        </td>
                                    </tr>
                                    <?php endforeach; endif; else: echo "" ;endif; ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <script>
                function new_jurisdiction_level() {
                    html =
                        '<div class="input-group" style="text-align: center">' +
                        '<h1 style="float:left;width:20%" > 等级 </h1>' +
                        '<input type="text" style="float:left;width:75%" id="new_jurisdiction_level_level_name" class="form-control" placeholder="等级" name="q">' +
                        ' </div>' +
                        '<div class="input-group" style="text-align: center">' +
                        '<h1 style="float:left;width:20%" > 积分 </h1>' +
                        '<input type="text" style="float:left;width:75%" id="new_jurisdiction_level_jurisdiction_number" class="form-control" placeholder="积分" name="q">' +
                        ' </div>' +
                        '<button onclick="new_jurisdiction_level_success()" style="position:absolute;left;0;bottom:0;" onclick="" type="button" class="btn mb-1 btn-primary btn-lg btn-block">确认</button>';
                    //页面层
                    layer.open({
                        type: 1,
                        skin: 'layui-layer-rim', //加上边框
                        area: ['420px', '240px'], //宽高
                        content: html
                    });
                }

                function new_jurisdiction_level_success() {
                    $.ajax({
                        type: "POST",
                        url: "./new_jurisdiction_level_success",
                        data: {
                            level_name: $('#new_jurisdiction_level_level_name').val(),
                            jurisdiction_number: $('#new_jurisdiction_level_jurisdiction_number').val(),
                        },
                        dataType: "",
                        success: function (response) {
                            if (response.code) {
                                alert('插入成功');
                                html =
                                    '<tr id="tr_jurisdiction_number_' + response.data.id + '">' +
                                    '<td>' +
                                    response.data.id +
                                    '</td>' +
                                    '<td id="td_level_name_' + response.data.id + '">' +
                                    response.data.level_name +
                                    '</td>' +
                                    '<td id="td_jurisdiction_number_' + response.data.id + '">' +
                                    response.data.jurisdiction_number +
                                    '</td>' +
                                    '<td>' +
                                    response.data.add_time +
                                    '</td>' +
                                    '<td>' +
                                    response.data.time +
                                    '</td>' +
                                    '<td>' +
                                    '<a onclick="edit_jurisdiction_level(\'' + response.data.id +
                                    '\')">编辑</a> ' +
                                    '｜<a onclick="delete_jurisdiction_level(\'' + response.data.id +
                                    '\',false)">删除</a>' +
                                    '</td>' +
                                    '</tr>';
                                $('#list').append(html);
                            } else {
                                alert('插入失败 ' + response.msg)
                            }
                        }
                    });

                }

                function delete_jurisdiction_level(id, calss) {
                    $.ajax({
                        type: "POST",
                        url: "./permissiontoreadindexgetbbsjurisdictionleveldelete",
                        data: {
                            id: id,
                            calss: calss,
                        },
                        dataType: "JSON",
                        success: function (response) {
                            if (response.code) {
                                alert('删除成功');
                                html = $('#tr_jurisdiction_number_' + id).html();
                                html = '<tr id="delete_tr_jurisdiction_number_' + id + '">' + html +
                                '</tr>';
                                if (calss) {
                                    $('#delete_tr_jurisdiction_number_' + id).empty();
                                } else {
                                    html = html.replace('edit_jurisdiction_level',
                                        'recover_jurisdiction_level');
                                    html = html.replace('编辑', '恢复');
                                    html = html.replace('false', 'true');
                                    html = html.replace('删除', '永久删除');
                                    $('#tr_jurisdiction_number_' + id).empty();
                                    $('#delete_list').append(html);
                                }
                                console.log(html);

                            } else {
                                alert(response.msg)
                            }
                        }
                    });
                }

                function recover_jurisdiction_level(id) {
                    $.ajax({
                        type: "POST",
                        url: "./permissiontoreadindexgetbbsjurisdictionlevelrecover",
                        data: {
                            id: id
                        },
                        dataType: "JSON",
                        success: function (response) {
                            if (response.code) {
                                alert('恢复成功');
                                html = $('#delete_tr_jurisdiction_number_' + id).html();
                                html = '<tr id="tr_jurisdiction_number_' + id + '">' + html + '</tr>';
                                html = html.replace('recover_jurisdiction_level', 'edit_jurisdiction_level')
                                html = html.replace('恢复', '编辑')
                                html = html.replace('true', 'false')
                                html = html.replace('永久删除', '删除');
                                html = html.replace('delete_', '');
                                $('#delete_tr_jurisdiction_number_' + id).empty();
                                $('#list').append(html);
                            } else {
                                alert(response.msg)
                            }
                        }
                    });
                }

                function edit_jurisdiction_level(id) {
                    $.ajax({
                        type: "POST",
                        url: "./PermissionToReadIndexGetBbsJurisdictionLevel",
                        data: {
                            id: id
                        },
                        dataType: "JSON",
                        success: function (response) {
                            if (response.code) {
                                html =
                                    '<div class="input-group" style="text-align: center">' +
                                    '<h1 style="float:left;width:20%" > 标题 </h1>' +
                                    '<input type="text" style="float:left;width:75%" id="level_name" class="form-control" value="' +
                                    response.data.level_name + '" name="q">' +
                                    ' </div>' +
                                    '<div class="input-group" style="text-align: center">' +
                                    '<h1 style="float:left;width:20%" > 积分 </h1>' +
                                    '<input type="text" style="float:left;width:75%" id="jurisdiction_number" class="form-control" value="' +
                                    response.data.jurisdiction_number + '" name="q">' +
                                    ' </div>' +
                                    '<button style="position:absolute;left;0;bottom:0;" onclick="submission(\'' +
                                    id +
                                    '\')" type="button" class="btn mb-1 btn-primary btn-lg btn-block">确认</button>';
                                //页面层
                                layer.open({
                                    type: 1,
                                    skin: 'layui-layer-rim', //加上边框
                                    area: ['420px', '240px'], //宽高
                                    content: html
                                });
                            } else {
                                alert(response.msg)
                            }
                        }
                    });

                }

                function submission(id) {
                    $.ajax({
                        type: "POST",
                        url: "./PermissionToReadIndexGetBbsJurisdictionLevelSave",
                        data: {
                            id: id,
                            level_name: $('#level_name').val(),
                            jurisdiction_number: $('#jurisdiction_number').val(),
                        },
                        dataType: "JSON",
                        success: function (response) {
                            if (response.code) {
                                alert('成功');
                                $('#td_level_name_' + id).html($('#level_name').val());
                                $('#td_jurisdiction_number_' + id).html($('#jurisdiction_number').val());
                            } else {
                                alert(response.msg);
                            }
                        }
                    });
                }
            </script>
        </div>
    </div>
    <!-- ////////////////////////////////////////////////////////////////////////////-->


    <footer class="footer footer-static footer-light navbar-border">
        <p class="clearfix text-muted text-sm-center mb-0 px-2"><span
                class="float-md-left d-xs-block d-md-inline-block">Copyright &copy; 2017 <a
                    href="https://themeforest.net/user/pixinvent/portfolio?ref=pixinvent" target="_blank"
                    class="text-bold-800 grey darken-2">PIXINVENT </a>, All rights reserved. </span><span
                class="float-md-right d-xs-block d-md-inline-block">Hand-crafted & Made with <i
                    class="icon-heart5 pink"></i></span></p>
    </footer>

    <!-- BEGIN VENDOR JS-->
    <script src="/public/bbs_admin/app-assets/vendors/js/ui/tether.min.js" type="text/javascript"></script>
    <script src="/public/bbs_admin/app-assets/vendors/js/ui/unison.min.js" type="text/javascript"></script>
    <script src="/public/bbs_admin/app-assets/vendors/js/ui/blockUI.min.js" type="text/javascript"></script>
    <script src="/public/bbs_admin/app-assets/vendors/js/ui/jquery.matchHeight-min.js" type="text/javascript"></script>
    <script src="/public/bbs_admin/app-assets/vendors/js/ui/screenfull.min.js" type="text/javascript"></script>
    <script src="/public/bbs_admin/app-assets/vendors/js/extensions/pace.min.js" type="text/javascript"></script>
    <!-- BEGIN VENDOR JS-->
    <!-- BEGIN PAGE VENDOR JS-->
    <!-- END PAGE VENDOR JS-->
    <!-- BEGIN ROBUST JS-->
    <script src="/public/bbs_admin/app-assets/js/core/app-menu.js" type="text/javascript"></script>
    <script src="/public/bbs_admin/app-assets/js/core/app.js" type="text/javascript"></script>
    <!-- END ROBUST JS-->
    <!-- BEGIN PAGE LEVEL JS-->
    <!-- END PAGE LEVEL JS-->
    <script>
        var cpLock = true;
        $('.com_search_input').on('compositionstart', function () {
            cpLock = false;
            //      console.log("compositionstart")
        });
        $('.com_search_input').on('compositionend', function () {
            cpLock = true;
            //      console.log("compositionend")
        });
        $(".com_search_input").on("input", function (e) {
            e.preventDefault();
            var _this = this;
            // console.log("input");
            setTimeout(function () {
                if (cpLock) {
                    $('#Tips').empty();
                    //开始写逻辑
                    $.ajax({
                        type: "POST",
                        url: "./article_select_select",
                        data: {
                            keyword: $('.com_search_input').val()
                        },
                        dataType: "JSON",
                        success: function (response) {
                            if (response.code) {
                                response.data.forEach(value => {
                                    $('#Tips').append(
                                        '<tr><td onclick="tisp_onclick(\'' +
                                        value.id + '\')">' + value.title +
                                        '</td></tr>')
                                });
                            }
                        }
                    });
                }
            }, 0)
        })

        function tisp_onclick(id) {
            console.log(id);
            window.location.href = '/bbs_admin/ArticleManagement/article_info_settings?id=' + id
        }
    </script>
    <script src="/public/bbs_admin/app-assets/js/core/libraries/bootstrap.min.js" type="text/javascript"></script>
</body>

</html>